﻿namespace Fuse8.DomainFramework.BusinessService
{
    /// <summary>
    /// Abstract class base class for implementation of Business Service Events Successors
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <remarks>All methods throw NotImplementedException</remarks>
    public abstract class BaseBusinessServiceEventsSuccessor<T> : IBusinessServiceEventsSuccessor<T>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>        
        public virtual SuccessorResult OnCreating(T entity)
        {
            return SuccessorResult.Default;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        public virtual void OnCreated(T entity)
        {
            
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>        
        public virtual SuccessorResult OnUpdating(T entity)
        {
            return SuccessorResult.Default;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        public virtual void OnUpdated(T entity)
        {
            
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>        
        public virtual SuccessorResult OnDeleting(T entity)
        {
            return SuccessorResult.Default;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        public virtual void OnDeleted(T entity)
        {
            
        }

        /// <summary>
        /// 
        /// </summary>
        public virtual int Order
        {
            get { return 0; }
        }
    }
}